# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kontactinterface
pkgver=20.04.3
pkgrel=0
arch="all !armhf"
url="https://kontact.kde.org/"
pkgdesc="Kontact Plugin Interface Library"
license="LGPL-2.0-only OR LGPL-3.0-only"
depends_dev="kcoreaddons-dev kparts-dev kwindowsystem-dev ki18n-dev kxmlgui-dev kiconthemes-dev"
makedepends="$depends_dev extra-cmake-modules"
source="https://download.kde.org/stable/release-service/$pkgver/src/kontactinterface-$pkgver.tar.xz"
subpackages="$pkgname-dev $pkgname-lang"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="a702d601ed90c6d90442bf13bf739917180670912dab6c3c4792046daa545ccb7294c8cb6a206dbd9fe6ef411eb7cd4cf113bc87e6b6f2f4517e8180fb4a6c87  kontactinterface-20.04.3.tar.xz"
